package com.tech.config;

import com.tech.bean.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description:
 * @Author: zl
 * @Date: 2019/7/19 16:21
 */
@Configuration
public class MainConfig {

    //给容器中注册一个Bean;类型为返回值的类型，id默认是用方法名作为id
    @Bean
    public Person person() {
        return  new Person("zhang",21);
    }


}
